"""ChameleonBot by AllanDemaon - 2009 Copyleft: All wrongs reserverd
File: BrowserDefs.py"""


MozillaHeaders ={
'Accept-Charset':'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
'Keep-Alive':'300',
'Connection':'keep-alive'}


ChameleonLoginData = {"function":"PATRONATTEMPT",
"search":"PATRON",
"lng":"pt",
"conf":"./chameleon.conf",
"skin":"default",
"u1":"12",
"SourceScreen":"PATRONLOGIN",
"patronhost":"babao.dr.ufu.br 1111 DEFAULT",
"sessionid":None,
"patronid":None,
"patronpassword":None}


formRenewDefaultData = {
"function":"RENEWAL",
"search":"PATRON",
"lng":"pt",
"conf":"./chameleon.conf",
"u1":"12",
"skin":"default",
"SourceScreen":"PATRONSUMMARY",
"pos":"1", #?
"prevpos":"1", #?
"patronhost":"babao.dr.ufu.br+1111+DEFAULT"}

BookEntryPatternBase='<td class="patSumRequestedColData">(.*)</td>'+'\n\n?'+'<td class="patSumRequestedColData">(.*)</td>'+'\n\n?'+'<td class="patSumRequestedColData">(.*)</td>'+'\n\n?'+'<td class="patSumRequestedColData">(.*)</td>'+'\n\n?'+'<td class="patSumCheckedOutColData">(.*)</td>'+'\n\n?'+'<td class="patSumCheckedOutColData">(.*)<br>'+'\n\n?'
BookEntryPatternBaseAtividade = '<td class="patActivDetailColData">(\\d)</td>'+'\n\n?'+'<td class="patActivDetailColData">(.*)</td>'+'\n\n?'+'<td class="patActivDetailColData">(.*)</td>'+'\n\n?'+'<td class="patActivDetailColData">(.*)</td>'+'\n\n?'+'<td class="patActivDetailColData">(\\d)</td>'+'\n\n?'+'<td class="patActivDetailColData">(.*)<br>'+'\n\n?'

BookEntryPatternS1='<input type="checkbox" name="itembarcode" value="(\\d*)">'
BookEntryPatternS2='<input name="itembarcode" value="(\\d*)" type="checkbox">'

#import re

#BookEntryE1 = re.compile(BookEntryPatternBase+BookEntryPatternS1)
#BookEntryE2 = re.compile(BookEntryPatternBase+BookEntryPatternS2)

#BookEntryE1 = re.compile(BookEntryPatternS1)
#BookEntryE2 = re.compile(BookEntryPatternS2)
